#pragma once 

#include "Common.h"
#include "IRenderState.h"
#include <d3d11.h>

namespace Display
{
	enum CullMode
	{
		BACK,
		FRONT,
		NONE
	};

	enum FillMode
	{
		SOLID,
		WIRE
	};

	class RasterizerState : Display::IRenderState
	{
		ID3D11RasterizerState * state;
		D3D11_RASTERIZER_DESC desc;

		CullMode cullMode;
		FillMode fillMode;

		RasterizerState();
		~RasterizerState();
	public:

		EXPORT void Dispose();

		EXPORT void Apply();
		EXPORT void SubmitChanges();

		EXPORT static RasterizerState *  Create(ID3D11Device * device);
		EXPORT static void Destroy(RasterizerState * blendState);

		EXPORT void SetFillMode(FillMode mode);
		EXPORT FillMode GetFillMode();
		
		EXPORT void SetCullMode(CullMode mode);
		EXPORT CullMode GetCullMode();

	private:
		void Build();
		
	};
}